package com.global.college.ui.activity;

import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.View;
import android.widget.TextView;

import com.global.college.R;
import com.global.college.base.BaseActivity;
import com.global.college.views.RoundCornerImageview;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 已购买训练营详情
 *
 * @author: xjh
 * @datetime: 2021/12/6
 */
public class CreateOrderActivity extends BaseActivity {
    @BindView(R.id.riv_order_pic)
    RoundCornerImageview rivPic;
    @BindView(R.id.tv_order_name)
    TextView tvOrderName;
    @BindView(R.id.tv_order_price)
    TextView tvOrderPrice;
    @BindView(R.id.tv_price)
    TextView tvAllPirce;
    @BindView(R.id.tv_train_price)
    TextView tvTrainPirce;

    private List<Fragment> mFragments = new ArrayList<>();
    private List<String> mTitles = new ArrayList<>();
    private int currentPosition = 0;
    private String trainId;

    @Override
    public int getContentViewId() {
        return R.layout.activity_create_order;
    }

    @Override
    public void onCreateNew(Bundle savedInstanceState) {
        setTitle(R.string.home_public);
        setShowTitleBar(true);
        setShowBack(true);
        trainId = getIntent().getStringExtra("trainId");
    }


    @Override
    public void getInitData() {
        getStudyBanner();
    }

    @OnClick({R.id.btn_pay})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_pay:
                // TODO: 2021/12/8 支付宝
                break;
            default:
                break;
        }
    }


    private void getStudyBanner() {
//        RequestClient.getInstance().getTrainBanner(trainId, UserData.getInstance().getUserModel().getUserId()).subscribe(new ProgressSubscriber<TrainBannerBean>(this, false) {
//            @Override
//            public void onNext(TrainBannerBean model) {
//
//            }
//
//            @Override
//            public void onError(Throwable e) {
//                super.onError(e);
//            }
//        });
    }
}
